package com.example.soa_exp2.common;

import com.example.soa_exp2.domain.BorrowRecord;
import lombok.Data;
import org.springframework.hateoas.RepresentationModel;

@Data
public class RecordModel extends RepresentationModel<RecordModel> {

    private final BorrowRecord content;

    private final String message;

    public RecordModel(BorrowRecord borrowRecord){
        this.content = borrowRecord;
        this.message = null;
    }

    public RecordModel(BorrowRecord borrowRecord, String message){
        this.content = borrowRecord;
        this.message = message;
    }
}
